﻿/*
 * Created by SharpDevelop.
 * User: christophe
 * Date: 11/04/2011
 * Time: 20:40
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;

using MetaVideoEditorEvolved.UI.Entity;
using mveEngine;

namespace MetaVideoEditorEvolved.Converter
{
	/// <summary>
	/// Description of DataStateToFontConverter.
	/// </summary>
	public class DataStateToFontConverter : IValueConverter
	{
		public DataStateToFontConverter()
		{
		}
		
		public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			if (!Config.Instance.UseTreeColor) {
				return Colors.Black.ToString();
			}
			else
			{
				int dataState = (int)value;
				
				if (dataState<21) {
					return Colors.Red.ToString();
				}
				else
				{
					if (dataState<70) {
						return Colors.Blue.ToString();
					}
				}
			}
			
			return Colors.Black.ToString();
		}
		
		public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			throw new NotImplementedException();
		}
	}
}
